import React, {useState} from "react";
import {ObjectPropertiesDialog} from '../../components/Dialog/ObjectPropertiesDialog'


const Count = () => {
  console.log('App 组件渲染了');
  const [count1, setCount1] = useState(0);
  const [count2, setCount2] = useState(0);

  return (
    <button onClick={() => {
      setCount1(count => count + 1)
      setCount2(count => count + 1)
    }}>
      {`Count1 is ${count1}, count2 is ${count2}`}
    </button>
  )
}


const CountAsync = () => {

}

const History = () => {
  return (
    <div>
      React 17 and React 18
      {
        `一、renderApi

        ReactDom.render(<App>,root);
        ReactDom.createRoot(root).render(App />)`
      }
      <br/>
      <Count/>
      <br/>
      <ObjectPropertiesDialog/>
    </div>
  )
}

export default Count;
